package bigdata.backend.task.test;

import bigdata.backend.config.DolphinSchedulerConfig;
import bigdata.backend.task.dto.TaskNodeDto;
import bigdata.backend.task.service.DolphinSchedulerService;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

import java.util.ArrayList;
import java.util.List;

@SpringBootTest
public class TestDolphinSchedulerService {

    @Autowired
    private DolphinSchedulerService dolphinSchedulerService;

    @Autowired
    private DolphinSchedulerConfig dolphinSchedulerConfig;

    @Test
    public void test01() throws Exception {
        Long code = dolphinSchedulerService.genTaskCode();
        System.out.println(code);
    }

    @Test
    void test02() {
        String apiBaseUrl = dolphinSchedulerConfig.getApiBaseUrl();
        System.out.println(apiBaseUrl);
    }

    @Test
    void test03() {
        List<TaskNodeDto> etlTasks = new ArrayList<>();
        TaskNodeDto taskNodeDto = new TaskNodeDto();
        taskNodeDto.setName("real");
    }
}
